import { axios } from '@/service/service'
export function saveOrUpdateTaskReq(data: any): any {
  return axios({
    url: '/api-taskManage/taskDefined/saveOrUpdateTask',
    method: 'post',
    data
  })
}
export function findTasksReq(params: any): any {
  return axios({
    url: '/api-taskManage/taskDefined/findTasks',
    method: 'get',
    params
  })
}

export function delTaskReq(params: any): any {
  return axios({
    url: '/api-taskManage/taskDefined/delTask',
    method: 'get',
    params
  })
}

export function findTaskLogsReq(params: any): any {
  return axios({
    url: '/api-taskManage/taskDefined/findTaskLogs',
    method: 'get',
    params
  })
}

export function findTaskDefinedLogReq(params: any): any {
  return axios({
    url: '/api-taskManage/taskDefined/findTaskDefinedLog',
    method: 'get',
    params
  })
}

export function taskReleaseReq(params: any): any {
  return axios({
    url: '/api-taskManage/taskDefined/release',
    method: 'get',
    params
  })
}

export function delTaskLogReq(params: any): any {
  return axios({
    url: '/api-taskManage/taskDefined/delTaskLog',
    method: 'get',
    params
  })
}

export function createOrModResReq(data: any): any {
  return axios({
    url: '/api-taskManage/resourceManage/createOrModify',
    method: 'post',
    data
  })
}

export function delResReq(params: any): any {
  return axios({
    url: '/api-taskManage/resourceManage/delete',
    method: 'get',
    params
  })
}

export function getResTreeReq(): any {
  return axios({
    url: '/api-taskManage/resourceManage/resourcesTree',
    method: 'get'
  })
}

export function createOrUpdateUdfReq(data: any): any {
  return axios({
    url: '/api-taskManage/udfDefined/saveOrUpdateUdf',
    method: 'post',
    data
  })
}

export function delUdfReq(params: any): any {
  return axios({
    url: '/api-taskManage/udfDefined/delete',
    method: 'get',
    params
  })
}
export function findUdfsReq(params: any): any {
  return axios({
    url: '/api-taskManage/udfDefined/findUdfs',
    method: 'get',
    params
  })
}

export function findLastTaskLogIdReq(params: any): any {
  return axios({
    url: '/api-taskManage/taskDefined/findLastTaskLogId',
    method: 'get',
    params
  })
}

export function runDataXReq(data: any): any {
  return axios({
    url: '/api-taskManage/taskDefined/runDataX',
    method: 'post',
    data
  })
}
